<!--
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>文章类型</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"></link>
</head>

<body>
    <div class="container">
        <h1>文章类型列表</h1>
        <hr>
        <h2>保存文章类型</h2>

        <form action="#" th:action="@{/articletype/save}" th:object="${articletype}" method="POST">
			<input type="hidden" name="id" th:if="${articletype!=null}" th:value="*{id}"/>
            <input type="text" th:field="*{type}" placeholder="天文" class="form-control mb-4 col-4">
            <button type="submit" class="btn btn-info col-2">保存</button>
        </form>

        <hr>

        <a th:href="@{/articletype/findAll}">返回文章类型列表</a>
    </div>
</body>

</html>-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>文章类型</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"></link>
    <style>
        body {
            background-color: #f8f9fa;
        }

        .container {
            max-width: 800px;
            margin: 50px auto;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            background-color: #ffffff;
        }

        h1, h2 {
            color: #343a40;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .btn-save {
            background-color: #007bff;
            border: none;
            color: white;
        }

        .btn-save:hover {
            background-color: #0056b3;
        }

        .return-link {
            color: #007bff;
            text-decoration: none;
        }

        .return-link:hover {
            text-decoration: underline;
        }
    </style>
</head>

<body>
<div class="container">
    <div class="text-center">
        <h1>文章类型列表</h1>
        <hr style="width: 50%; margin: auto;">
        <h2>保存文章类型</h2>
    </div>

    <form action="#" th:action="@{/articletype/save}" th:object="${articletype}" method="POST" class="text-center">
        <div class="form-group">
            <input type="hidden" name="id" th:if="${articletype!=null}" th:value="*{id}"/>
            <input type="text" th:field="*{type}" placeholder="请输入文章类型" class="form-control" required>
        </div>
        <button type="submit" class="btn btn-save">保存</button>
    </form>

    <div class="text-center mt-4">
        <hr style="width: 50%; margin: auto;">
        <a th:href="@{/articletype/findAll}" class="return-link">返回文章类型列表</a>
    </div>
</div>
</body>

</html>